{% extends "base.html" %} 
{% block head %}
<script type="text/javascript" src="/static/js/master.js?v=3567"></script>
<script type="text/javascript">
        $().ready(function() {
            $("#title").blur(function() { QuestionSuggestions(); });
            if ($("#ask-error-container").length == 0)
                $("#title").focus();
        });
        
        function QuestionSuggestions() {
            var s = $("#title").val();            
            if (s.length > 2) {
                document.title = s + " - Stack Overflow";
                $("#question-suggestions").load("/search/titles?like=" + escape(s));
            }
        }
</script>
{% endblock %}
 
{% block title %}Add idea{% endblock %}
 
{% block content %}
<div id="subheader">
<h2>Постави прашање</h2>
</div>
<div id="mainbar" style="width: 660px;">
<form id="post-form" method="post" action="/questions/ask/">
<div class="form-item" style="margin-bottom: -15px;"><label
	for="title"> {{ q.title }} <span class="form-error"></span> </label> <input
	id="title" type="text" value="" tabindex="100" size="82"
	maxlength="300" name="title" />
<div id="question-suggestions" class="form-item-info"
	style="width: 650px;">What's your programming question? Be
descriptive.</div>
</div>
<script type="text/javascript" src="/static/js/editor.js"></script> 
<script	type="text/javascript" src="/static/js/wmd.js"></script> 
<script	type="text/javascript">
	$(function() { editorReady(0); });
</script>

<div id="post-editor">
	<div id="wmd-container" class="resizable-textarea">
		<div id="wmd-button-bar">
		</div>
		<textarea id="wmd-input" name="post-text" cols="92" rows="15" tabindex="101"></textarea> 
		<span class="form-error"></span>
	</div>
	
	<div id="wmd-preview">
	</div>
	<div id="post-editor-hidden">
	<input id="fkey" name="fkey" type="hidden" value="6a47a6ec5de23720e2b38487e3ecd8e141ff0f02c3a7633c1deae99690762777">
	</div>
</div>

<script src="/static/js/tageditor.js?v=2114" type="text/javascript"></script>

<script type="text/javascript">
$().ready(function() {        	
	$("#tagnames").autocomplete("/tags/filter/", {
		max: 6,
		highlightItem: true,
		multiple: true,
		multipleSeparator: " ",
		matchContains: true,
		scroll: true,
		scrollHeight: 300
	});	
	 
    $("#tagnames").rules("add", { required: true });
    
})
</script>

<div class="form-item">
	<label>Tags <span class="form-error"></span>
	</label> 
	<input id="tagnames" name="tagnames" type="text" size="60" value="" tabindex="103">
	<div class="form-item-info">Combine multiple words into single-words, space to separate up to 5 tags (python c# ruby)</div>
</div>

<div>
<div>
<h2>
<p><input type="checkbox" id="notify-email" name="notify-email">Notify 
<input id="notify-email-address" name="notify-email-address" disabled="true" type="text" style="width: 260px;" value="">
daily of any new answers</p>
</h2>
</div>
</div>
<script src="/static/js/tageditor.js" type="text/javascript"></script>
<script src="/static/js/third-party/jquery.typewatch.js" type="text/javascript"></script> 
<script type="text/javascript">
    $().ready(function() {
        initEmailNotification(0);        
    });
    
    function saveEmailNotification(email) {        
		$.ajax (
		{
		    type: "POST",
		    url: "/posts/0/update-owner-notification",		    
		    data: { "fkey": fkey, "notifyEmailAddress": email, "notifyEmail": $("#notify-email").is(":checked")},
		    dataType: "html",
		    success: function (result)
		    {   
		        var domelement = $(result);
		        
		    }
		});
	}    
	
    function initEmailNotification(postId) {

        toggleEmailNotification();

        $("#notify-email").click(function() {
            toggleEmailNotification();
                            
        });
    }

    function toggleEmailNotification() {
        if ($("#notify-email").is(":checked"))
            $("#notify-email-address").removeAttr('disabled');
        else
            $("#notify-email-address").attr('disabled', true);
    }	
</script>


<div class="form-submit" style="clear: both;">
<input	id="submit-button" type="submit" value="Ask Your Question"	tabindex="120">
</div>


</form>
</div>
<div id="sidebar">here is the side bar</div>
{% endblock %}
